import { defHttp } from '/@/utils/http/axios'

enum Api {
  send = '/websocket/sendToUser',
  getChats = '/chat/getChats',
}

/**
 * @description:
 */

export const send = (data) => {
  return defHttp.post({ url: Api.send, data })
}

export const getChatsApi = (data) => {
  return defHttp.post({ url: Api.getChats, data })
}

export const getUsers = (userId) => {
  return defHttp.get({ url: `/chat/getChatter/${userId}` })
}